<script setup lang="ts">
// 1. 导入 definestore 返回的那个对象
import { useCounterStore } from '@/stores/counter'
import { useJokerStore } from '@/stores/joker'

const store = useCounterStore()
const joke = useJokerStore()
</script>

<template>
  <h2>我的页面</h2>
  <h3>pinia 中的数据{{ store.count }}</h3>
  <h3>pinia 中的双倍数据{{ store.doubleCount }}</h3>
  <button @click="store.increment">累加</button>
  <h2>笑话</h2>
  <h3>{{ joke.joke }}</h3>
  <button @click="joke.refreshJoke">更改笑话</button>
</template>

<style></style>
